package com.lyz.springcloud.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author 李勇志
 * @create 2019-11-22 12:06
 */
@Data

@NoArgsConstructor
@Accessors(chain = true)//链式写法

public class Dept implements Serializable {//Dept 实体类 orm 类表关系映射
    private Long deptno;//主键
    private String dname;

    //这个数据库存在哪个数据库的字段的微服务，一个服务对应一个数据库，同一个信息可能存在不同的数据库
    private String db_source;

    //@org.jetbrains.annotations.Contract(pure = true)
   //public Dept(String dname) {this.dname = dname;}

    public Long getDeptno() {
        return deptno;
    }

    public void setDeptno(Long deptno) {
        this.deptno = deptno;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public String getDb_source() {
        return db_source;
    }

    public void setDb_source(String db_source) {
        this.db_source = db_source;
    }

    @Override
    public String toString() {
        return "Dept{" +
                "deptno=" + deptno +
                ", dname='" + dname + '\'' +
                ", db_source='" + db_source + '\'' +
                '}';
    }
}
